<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>测试代码--九九乘法表</title>
<script type="text/javascript">
	function myMethod(value) {
		var ROWS = value;
		//var strNinenine="";
		document
				.write("<table border='1' bordercolor='red' cellspacing='0' cellpadding='8'>");
		for (var i = 1; i <= ROWS; i++) {
			document.write("<tr>" + "<td bgcolor='blue'>" + i + "</td>");
			for (var j = 1; j <= i; j++) {
				document.write("<td bgcolor='yellow'>" + i + "*" + j + "=" + i
						* j + "</td>");
			}
			document.write("</tr>");
		}
		document.write("</table>");
	
		//document.getElementById("id1").innerHTML=str;
	}
</script>
</head>
<body>
	<script type="text/javascript">
		//myMethod(4);//多个标签内，都可以使用；
	</script>

	<form name="myform">
		请输入乘数：<input type="text" name="text" value="9" /> <input
			type="button" name="button" value="显示乘法表"
			onclick="myMethod(document.myform.text.value)" /> <input
			type="reset" name="reset" value="重置"><br />
		数据显示区域：<br /><textarea name="textarea" cols="50" rows="15" id="id1">
			</textarea>
	<a target=document.myform.textarea><input type="text" /></a>
	</form>
	
	<div id="div1s">
	
	</div>
</body>
</html>